#include <stdio.h>
unsigned long int fact(int n);

void main(){
	unsigned long int i=1,n=1;
	scanf("%lu",&n);
	for (i=1;i<=n;i++){
		printf("%d! = %lu\n", i,fact(i));
	}
}
unsigned long int fact(int n){
	unsigned long int i=1,ret=1;
	for (i=1;i<=n;i++){
		ret*=i;
	}
	return ret;
}
